using System;
using Admin.NET.Core;
using SqlSugar;

namespace Admin.NET.Application.Entity.Business;

[SugarTable("WaterDevice", "水表")]
[SysTable]
public class WaterDevice : EntityBaseData
{
	/// <summary>
	/// 表地址或站号，（645 高位-&gt;低位，需在保存或编辑时颠倒一次,作为指令下发等使用）
	/// </summary>
	public string Addr { get; set; }

	/// <summary>
	/// 信号强度
	/// </summary>
	public int? RSSI { get; set; }

	/// <summary>
	/// 协议类型：0：4G/NB 1采集网关
	/// </summary>
	public int ProtocolType { get; set; }

	/// <summary>
	/// 645表地址,低位-&gt;高位，平台显示所用
	/// </summary>
	public string? LowAddr { get; set; }

	/// <summary>
	/// 水表状态
	/// </summary>
	public int WaterState { get; set; }

	/// <summary>
	/// 水表名称
	/// </summary>
	public string WaterName { get; set; }

	/// <summary>
	/// 水表编号
	/// </summary>
	public string Sn { get; set; }

	/// <summary>
	/// 是否在线 0是离线 1 是在线
	/// </summary>
	public int IsOnline { get; set; }

	/// <summary>
	/// 水价方案
	/// </summary>
	public long? PriceRuleId { get; set; }

	/// <summary>
	/// 区域id
	/// </summary>
	public long? BuildingId { get; set; }

	/// <summary>
	/// 房间id
	/// </summary>
	public long? RoomId { get; set; }

	/// <summary>
	/// 采集器id
	/// </summary>
	public long? CollectorId { get; set; }

	/// <summary>
	/// 倍率
	/// </summary>
	public int Multiplier { get; set; }

	/// <summary>
	/// 最新抄表时间
	/// </summary>
	public DateTime? LatestMeterReadingTime { get; set; }

	/// <summary>
	/// 最新在线时间或离线时间
	/// </summary>
	public DateTime? LastOnlineTime { get; set; }

	/// <summary>
	/// 正向累计用量
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? PositiveDosage { get; set; }

	/// <summary>
	/// 反向累计用量
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? ReverseUsage { get; set; }

	/// <summary>
	/// 总累计用量
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? TotalUsage { get; set; }

	/// <summary>
	/// 品牌型号id
	/// </summary>
	[SugarColumn(DefaultValue = "0")]
	public long BrandId { get; set; }

	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? TotalUsageLast { get; set; }

	/// <summary>
	/// 总累计用量 底数
	/// </summary>
	[SugarColumn(Length = 28, DecimalDigits = 10)]
	public decimal? AllTotalUsage { get; set; }

	[SugarColumn(IsNullable = true)]
	public long? LableId { get; set; }

	[SugarColumn(IsNullable = true)]
	public bool? isPublicMeter { get; set; }
}
